{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% import '_macros.html' as macros %}
{% import '_my_wtf_macros.html' as my_wtf_macros %}
{% import 'partial/enterprise_project_table.html' as project_table_macro %}
{% import 'partial/enterprise_product_table.html' as product_table_macro %}
{% import 'partial/enterprise_security_table.html' as security_table_macro %}
{% import 'partial/enterprise_honour_table.html' as honour_table_macro %}
{% import 'partial/enterprise_picture_table.html' as picture_table_macro %}
{% import 'partial/enterprise_media_report_table.html' as media_report_macro %}
{% import 'partial/enterprise_dispatch_rule_table.html' as dispatch_rules %}

{% block title %}万屏时代--首页扩展信息编辑({{ enterprise_homepage.enterprise_name }}){% endblock %}

{% block panel_heading %}
    万屏时代--首页扩展信息编辑({{ enterprise_homepage.enterprise_name }})
{% endblock %}

{% block panel_body %}
    <form class="form form-inline form-group-sm">
    <div class="well well-sm">
        项目案例（图片尺寸360*240px）(建议图片不超过200KB)
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_item_add', item_key='project', enterprise_id=enterprise_id) }}"
               class="btn btn-xs btn-success" style="margin-right: 5px" target="_blank">
                新建项目案例
            </a>
        </div>
    </div>
    {{ project_table_macro.gen_table(enterprise_projects) }}
    <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>

    <div class="well well-sm">
        保障体系（需填写4个）(建议图片不超过200KB)
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_item_add', item_key='security', enterprise_id=enterprise_id) }}" class="btn btn-xs btn-success"
              style="margin-right: 5px;" target="_blank">
                新增保障体系
            </a>
        </div>
    </div>
    {{ security_table_macro.gen_table(enterprise_securities) }}
    <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>

    <div class="well well-sm">
        产品展示（图片尺寸360*240px）(建议图片不超过200KB)
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_item_add', item_key='product', enterprise_id=enterprise_id) }}" class="btn btn-xs btn-success"
              style="margin-right: 5px;" target="_blank">
                新增产品展示
            </a>
        </div>
    </div>
    {{ product_table_macro.gen_table(enterprise_products) }}
    <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>

    <div class="well well-sm">
        荣誉资质（图片尺寸256*180px）(建议图片不超过200KB)
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_item_add', item_key='honour', enterprise_id=enterprise_id) }}" class="btn btn-xs btn-success"
              style="margin-right: 5px;" target="_blank">
                新增荣誉资质
            </a>
        </div>
    </div>
    {{ honour_table_macro.gen_table(enterprise_honours) }}
    <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>

    <div class="well well-sm">
        公司图片（图片尺寸570*350px）(建议图片不超过200KB)
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_item_add', item_key='picture', enterprise_id=enterprise_id) }}" class="btn btn-xs btn-success"
              style="margin-right: 5px;" target="_blank">
                新增公司图片
            </a>
        </div>
    </div>
    {{ picture_table_macro.gen_table(enterprise_pictures) }}
    <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>

    <div class="well well-sm">
        媒体报道（图片尺寸256*180px）(建议图片不超过200KB)
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_item_add', item_key='media_report',  enterprise_id=enterprise_id) }}" class="btn btn-xs btn-success"
            style="margin-right: 5px" target="_blank">
                新增媒体报道
            </a>
        </div>
    </div>
        {{ media_report_macro.gen_table(enterprise_media_reports) }}
        <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>

    <div class="well well-sm">
        企业派单规则
        <div class="pull-right btn-group">
            <a href="{{ url_for('enterprise_bp.enterprise_dispatch_rule_add',  enterprise_id=enterprise_id) }}" class="btn btn-xs btn-success" style="margin-right: 5px" target="_self">
                新增派单规则
            </a>
        </div>
    </div>
        {{ dispatch_rules.gen_table(enterprise_dispatch_rules, enterprise_id=enterprise_id) }}
        <div class="clearfix visible-xs-block visible-sm-block visible-md-block visible-lg-block"></div>
    </form>
{% endblock %}
